<template >
  <div class="tabBar_container">
    <router-view></router-view>
    <van-tabbar v-model="active">
      <van-tabbar-item icon="home-o" @click="iconClick('/home')"
        >标签</van-tabbar-item
      >
      <van-tabbar-item icon="search" @click="iconClick('/cart')"
        >标签</van-tabbar-item
      >
      <van-tabbar-item icon="friends-o" @click="iconClick('/category')"
        >标签</van-tabbar-item
      >
      <van-tabbar-item icon="setting-o" @click="iconClick('/mine')"
        >标签</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'tabBar',
  data () {
    return {
      active: 0
    }
  },
  methods: {
    iconClick (path) {
      // console.log(this.active)
      this.$router.push(path)
    }
  }
}
</script>
<style lang="less" scoped>
.tabBar_container {
  background-color: #f5f7f9;
}
</style>
